package com.jr.controller;


import com.google.gson.Gson;
import com.jr.entity.City;
import com.jr.entity.Resume;
import com.jr.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import java.util.List;


/**
 * 市表
 *
 * @author Snoopy
 * @since 1.0.0 2022-12-31
 */
@Controller
public class CityController {
    @Autowired
    private CityService cityService;

    /**
     * 获取城市列表
     */
    @RequestMapping(value = "getCitys.do", produces = "text/html;charset=utf-8")
    public @ResponseBody String getCitys(String pid){
        List<City> citys = cityService.getCitys(pid);
        return new Gson().toJson(citys);
    }


}